function changevalue(select_name){
	if(select_name=='hanhdong'){
		var index = document.forms['position'].hanhdong.value;
		document.forms['position'].hanhdong1.options[index-1].selected = true;
		
	}else{
		var index = document.forms['position'].hanhdong1.value;
		document.forms['position'].hanhdong.options[index-1].selected = true;
	}
}

function editCurrentRow(obj){
	var thisRow = obj.parentNode.parentNode;
	var tbl = thisRow.parentNode.parentNode;
	var rIndex = thisRow.sectionRowIndex;
	var row_value = "textgrp"+rIndex;
	var tb_group=document.forms["position"].elements[row_value];
	
	var posid = document.getElementById("POSID");
	var Curcode = document.getElementById("Curcode");
	var limit = document.getElementById("limit");
	var RMlimit = document.getElementById("RMlimit");
	
	posid.value = tb_group[0].value;
	var i =0 ;
	var cbo_;
	
	for(i=0;i<Curcode.length;i++){
		cbo_ = Curcode.options[i].value.indexOf(tb_group[1].value);
		if(cbo_ >=0){
			Curcode.options[i].selected = true;
			var activecurrcode = document.getElementById("activeCURCODE");
			activecurrcode.value = tb_group[1].value;
			break;
		}
	}
	if(tb_group[2].value!=0){
		limit.value = tb_group[2].value;
	}else{
		limit.value = "0.00";
	}
	if(tb_group[3].value!=0){
		RMlimit.value = tb_group[3].value;
	}else{
		RMlimit.value = "0.00";
	}
}